//
//  Singleton.h
//  SXparent
//
//  Created by HuangSui on 16/10/24.
//  Copyright © 2016年 SuiXun. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "YKButton.h"
#import "YKTextField.h"
#import "ykTableView.h"
#import "myPicker.h"

#import <AVFoundation/AVFoundation.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <AssetsLibrary/AssetsLibrary.h>
#import <Photos/Photos.h>


typedef  void(^didFinish)(UIImagePickerController *picker, NSDictionary<NSString *,id> * info);
typedef  void(^btnAction)(UIButton *btn);
typedef  void(^TFAction)(YKTextField *textField,NSRange range,NSString *string);
typedef  void(^selectAction)(ykTableView *tableView,NSIndexPath * indexPath);


@interface Singleton : NSObject<UITextFieldDelegate,UITableViewDelegate, UITableViewDataSource,UINavigationControllerDelegate, UIImagePickerControllerDelegate>


//获取单例
+(instancetype)sharedSingleton;



-(YKButton *)endButton:(UIColor *)color andTitle:(NSString *)str RequestSuccess:(btnAction)requestSuccess;
-(UILabel *)myLabel:(UIColor *)color andTitle:(NSString *)str andFont:(CGFloat )font;
-(YKTextField *)myTextFieldsecure:(BOOL)secureTextEntry andkeyboardType:(UIKeyboardType)kt andplaceholder:(NSString *)str andLeftImage:(NSString *)imageStr RequestSuccess:(TFAction)requestSuccess;
-(ykTableView *)myTableViewWithFrame:(CGRect)frame withRefresh:(BOOL)refresh didSelect:(selectAction)didSelectRowAtIndexPath;
-(UIScrollView *)myScrollViewWithFrame:(CGRect)frame withContentSize:(CGSize)size;
-(void)PhotoAction:(UIViewController *)vc RequestSuccess:(didFinish)requestSuccess;








@end
